package com.arpa.ntocc.basic.api.domain.entity;

import com.arpa.ntocc.common.domain.entity.BasicEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;

/**
 * <p>
 * 表数据备份配置
 * </p>
 *
 * @author LEO
 * @since 2021-06-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_table_backup_config")
@ApiModel(value = "TableBackupConfig对象", description = "表数据备份配置")
public class TableBackupConfig extends BasicEntity<TableBackupConfig> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "唯一标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "主库表名")
    @TableField("table_name")
    private String tableName;

    @ApiModelProperty(value = "备份到从库的表名")
    @TableField("backup_table_name")
    private String backupTableName;

    @ApiModelProperty(value = "备份时间（单位：天），即备份多长时间之前的数据")
    @TableField("backup_time")
    private Integer backupTime;

    @ApiModelProperty(value = "是否启用 Y启用，N不启用")
    @TableField("is_use")
    private String isUse;

    @ApiModelProperty(value = "备份起始时间,备份天数的基础条件")
    @TableField("appointed_day")
    private LocalDateTime appointedDay;


}
